/*
 * MotorControl.h
 *
 *  Created on: Nov 5, 2012
 *      Author: banfield
 */

#ifndef MOTORCONTROL_H_
#define MOTORCONTROL_H_

/*****************************************************
 * Define Statements
 ****************************************************/
 #define CLKWISE -1
#define CNTR_CLKWISE 1
#define HOME_DIR NULL	

#define X_MOTOR 0b1 	// pin for x motor enable
#define Y_MOTOR 0b10 	// pin for y motor enable
#define PHI_MOTOR 0b100 // pin for phi motor enable

/*****************************************************
 * Public Function Prototypes
 ****************************************************/
void InitMotors(void);
float SingleStepMotor(char motor, int direction);
void MoveToCoord(float x, float y, float phi);
void ReturnHome(void);
float GetCurrentX(void);
float GetCurrentY(void);
float GetCurrentPhi(void);
void SetMotor(char motor);
void SetDirection(int *steps);
void Step(void);

#endif /* MOTORCONTROL_H_ */
